﻿namespace ACCOUNTING
{
    using ACCOUNTING.LVY.Business;
    using ACCOUNTING.My;
    using ACCOUNTING.My.Resources;
    using C1.Win.C1Command;
    using C1.Win.C1FlexGrid;
    using C1.Win.C1FlexGrid.Util.BaseControls;
    using Microsoft.VisualBasic;
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Diagnostics;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;

    [DesignerGenerated]
    public class Frm_DMNhanVien : Form
    {
        private static List<WeakReference> __ENCList = new List<WeakReference>();
        [AccessedThroughProperty("C1DockingTab1")]
        private C1DockingTab _C1DockingTab1;
        [AccessedThroughProperty("C1DockingTab2")]
        private C1DockingTab _C1DockingTab2;
        [AccessedThroughProperty("C1DockingTabPage1")]
        private C1DockingTabPage _C1DockingTabPage1;
        [AccessedThroughProperty("C1DockingTabPage2")]
        private C1DockingTabPage _C1DockingTabPage2;
        [AccessedThroughProperty("CboLoaiNhanVien")]
        private ComboBox _CboLoaiNhanVien;
        [AccessedThroughProperty("CKActive")]
        private CheckBox _CKActive;
        [AccessedThroughProperty("CmdAdd")]
        private ToolStripButton _CmdAdd;
        [AccessedThroughProperty("CmdDel")]
        private ToolStripButton _CmdDel;
        [AccessedThroughProperty("CmdEdit")]
        private ToolStripButton _CmdEdit;
        [AccessedThroughProperty("CmdExit")]
        private ToolStripButton _CmdExit;
        [AccessedThroughProperty("CmdFind")]
        private ToolStripButton _CmdFind;
        [AccessedThroughProperty("CmdHelp")]
        private ToolStripButton _CmdHelp;
        [AccessedThroughProperty("CmdPrint")]
        private ToolStripButton _CmdPrint;
        [AccessedThroughProperty("CmdSave")]
        private ToolStripButton _CmdSave;
        [AccessedThroughProperty("CmdUnsave")]
        private ToolStripButton _CmdUnsave;
        [AccessedThroughProperty("Label1")]
        private Label _Label1;
        [AccessedThroughProperty("Label10")]
        private Label _Label10;
        [AccessedThroughProperty("Label11")]
        private Label _Label11;
        [AccessedThroughProperty("Label12")]
        private Label _Label12;
        [AccessedThroughProperty("Label14")]
        private Label _Label14;
        [AccessedThroughProperty("Label18")]
        private Label _Label18;
        [AccessedThroughProperty("Label2")]
        private Label _Label2;
        [AccessedThroughProperty("Label3")]
        private Label _Label3;
        [AccessedThroughProperty("Label5")]
        private Label _Label5;
        [AccessedThroughProperty("Label6")]
        private Label _Label6;
        [AccessedThroughProperty("Label7")]
        private Label _Label7;
        [AccessedThroughProperty("Label9")]
        private Label _Label9;
        [AccessedThroughProperty("Panel1")]
        private Panel _Panel1;
        [AccessedThroughProperty("ToolStrip1")]
        private ToolStrip _ToolStrip1;
        [AccessedThroughProperty("ToolStripButton1")]
        private ToolStripSeparator _ToolStripButton1;
        [AccessedThroughProperty("ToolStripSeparator1")]
        private ToolStripSeparator _ToolStripSeparator1;
        [AccessedThroughProperty("ToolStripSeparator2")]
        private ToolStripSeparator _ToolStripSeparator2;
        [AccessedThroughProperty("ToolStripSeparator3")]
        private ToolStripSeparator _ToolStripSeparator3;
        [AccessedThroughProperty("TxtDiaChi")]
        private TextBox _TxtDiaChi;
        [AccessedThroughProperty("TxtDienThoai")]
        private TextBox _TxtDienThoai;
        [AccessedThroughProperty("TxtEmail")]
        private TextBox _TxtEmail;
        [AccessedThroughProperty("TxtFax")]
        private TextBox _TxtFax;
        [AccessedThroughProperty("TxtGhichu")]
        private TextBox _TxtGhichu;
        [AccessedThroughProperty("TxtMa")]
        private TextBox _TxtMa;
        [AccessedThroughProperty("TxtSearchCode")]
        private TextBox _TxtSearchCode;
        [AccessedThroughProperty("TxtSearchName")]
        private TextBox _TxtSearchName;
        [AccessedThroughProperty("TxtTenAnh")]
        private TextBox _TxtTenAnh;
        [AccessedThroughProperty("TxtTenViet")]
        private TextBox _TxtTenViet;
        [AccessedThroughProperty("TxtWebsite")]
        private TextBox _TxtWebsite;
        [AccessedThroughProperty("VSList")]
        private C1.Win.C1FlexGrid.C1FlexGrid _VSList;
        public bool bLoaded;
        private object cFrmCall;
        private DataView cFrmData;
        private string cFrmKhoa;
        private string cFrmKhoaOld;
        private string cFrmTask;
        private IContainer components;
        private bool mAllowAdd;
        private bool mAllowDel;
        private bool mAllowEdit;
        private bool mAllowView;
        private bool mEnableControl;
        private clsDMLienHeDoiTuong objDMLIENHEDOITUONG;
        private clsDMDoiTuong objDMNHANVIEN;
        private string pKhoaDoiTuong;

        public Frm_DMNhanVien()
        {
            base.KeyDown += new KeyEventHandler(this.Frm_DMNhanVien_KeyDown);
            base.Load += new EventHandler(this.Frm_DMNhanVien_Load);
            List<WeakReference> list = __ENCList;
            lock (list)
            {
                __ENCList.Add(new WeakReference(this));
            }
            this.bLoaded = false;
            this.cFrmKhoaOld = "";
            this.cFrmKhoa = "";
            this.pKhoaDoiTuong = "";
            this.cFrmTask = "";
            this.mAllowEdit = true;
            this.mAllowDel = false;
            this.objDMNHANVIEN = new clsDMDoiTuong();
            this.objDMLIENHEDOITUONG = new clsDMLienHeDoiTuong();
            this.InitializeComponent();
        }

        public bool CheckIvalid()
        {
            if (this.TxtMa.Text.Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập m\x00e3!", ""));
                this.TxtMa.Focus();
                return false;
            }
            if (this.objDMNHANVIEN.TrungMa(this.TxtMa.Text.Trim(), this.cFrmKhoa))
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("M\x00e3 n\x00e0y đ\x00e3 tồn tại, bạn phải nhập m\x00e3 kh\x00e1c!", ""));
                this.TxtMa.Focus();
                return false;
            }
            if ((this.TxtTenViet.Text.Trim() == "") & (this.TxtTenAnh.Text.Trim() == ""))
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập t\x00ean!", ""));
                this.TxtTenViet.Focus();
                return false;
            }
            return true;
        }

        private void CmdAdd_Click(object sender, EventArgs e)
        {
            if (this.cFrmKhoa.Trim() != "")
            {
                this.cFrmKhoaOld = this.cFrmKhoa;
            }
            this.EmptyData();
        }

        private void CmdDel_Click(object sender, EventArgs e)
        {
            if (LVYModule.ConfirmDelete("") && this.objDMNHANVIEN.DelData(this.cFrmKhoa))
            {
                this.VSList.RemoveItem(this.VSList.Row);
                this.VSList_RowColChange(RuntimeHelpers.GetObjectValue(sender), e);
            }
        }

        private void CmdEdit_Click(object sender, EventArgs e)
        {
            if (((this.VSList.Rows.Count != 1) && (this.VSList.Row > 0)) && (this.cFrmKhoa.Trim() != ""))
            {
                this.EnableControl = true;
                this.cFrmTask = "U";
            }
        }

        private void CmdExit_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }

        private void CmdHelp_Click(object sender, EventArgs e)
        {
            LVYModule.ShowHelp(@"DANHMUCDUNGCHUNG\DANHMUC\NHANVIEN.mht");
        }

        private void CmdPrint_Click(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            DataTable dataTable = this.objDMNHANVIEN.ShowListByField("Khoa|Ma|TenViet|TenAnh|DienThoai|Email|DiaChi", "RTRIM(Loai) = 'E'", " Ma, TenViet");
            Rpt_DMNhanVien vien = new Rpt_DMNhanVien();
            try
            {
                vien.SetDataSource(dataTable);
                if (modGeneral.H_LANGUAGE == "VIET")
                {
                    vien.SetParameterValue(0, modGeneral.Tranlated(modGeneral.H_COMPANYNAMEVIET, ""));
                }
                else
                {
                    vien.SetParameterValue(0, modGeneral.Tranlated(modGeneral.H_COMPANYNAMEANH, ""));
                }
                vien.SetParameterValue(1, modGeneral.Tranlated("Địa chỉ", "") + ": " + modGeneral.H_ADDRESS);
                vien.SetParameterValue(2, modGeneral.Tranlated("M\x00e3 số thuế", "") + ": " + modGeneral.H_TAXCODE);
                vien.SetParameterValue(3, modGeneral.Tranlated("Điện thoại", "") + ": " + modGeneral.H_TELEPHONE);
                vien.SetParameterValue(4, modGeneral.Tranlated("Fax", "") + ": " + modGeneral.H_FAX);
                vien.SetParameterValue(5, modGeneral.Tranlated("DANH MỤC NH\x00c2N VI\x00caN", ""));
                vien.SetParameterValue(6, modGeneral.Tranlated("STT", ""));
                vien.SetParameterValue(7, modGeneral.Tranlated("M\x00e3", ""));
                vien.SetParameterValue(8, modGeneral.Tranlated("T\x00ean (Tiếng Việt)", ""));
                vien.SetParameterValue(9, modGeneral.Tranlated("T\x00ean (Tiếng Anh)", ""));
                vien.SetParameterValue(10, modGeneral.Tranlated("Điện thoại", ""));
                vien.SetParameterValue(11, modGeneral.Tranlated("Email", ""));
                vien.SetParameterValue(12, modGeneral.Tranlated("Địa chỉ", ""));
                vien.SetParameterValue(13, modGeneral.Tranlated("Diễn giải", ""));
                vien.SetParameterValue(14, modGeneral.Tranlated("Ng\x00e0y .... th\x00e1ng .... năm ............", ""));
                vien.SetParameterValue(15, modGeneral.Tranlated("NGƯỜI LẬP", ""));
                MyProject.Forms.Frm_ViewReport.ReportViewer.ReportSource = vien;
                MyProject.Forms.Frm_ViewReport.ReportViewer.DisplayGroupTree = false;
                this.Cursor = Cursors.Default;
                MyProject.Forms.Frm_ViewReport.ShowDialog();
            }
            catch (Exception exception1)
            {
                ProjectData.SetProjectError(exception1);
                Exception exception = exception1;
                MessageBox.Show(exception.Message.ToString());
                ProjectData.ClearProjectError();
            }
        }

        private void CmdSave_Click(object sender, EventArgs e)
        {
            if (this.CheckIvalid())
            {
                clsDMDoiTuong objDMNHANVIEN = this.objDMNHANVIEN;
                objDMNHANVIEN.Khoa = this.cFrmKhoa;
                objDMNHANVIEN.Ma = this.TxtMa.Text;
                objDMNHANVIEN.TenViet = this.TxtTenViet.Text;
                objDMNHANVIEN.TenAnh = this.TxtTenAnh.Text;
                objDMNHANVIEN.DiaChi = this.TxtDiaChi.Text;
                objDMNHANVIEN.DienThoai = this.TxtDienThoai.Text;
                objDMNHANVIEN.Fax = this.TxtFax.Text;
                objDMNHANVIEN.Email = this.TxtEmail.Text;
                objDMNHANVIEN.Website = this.TxtWebsite.Text;
                objDMNHANVIEN.Loai = "E" + LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboLoaiNhanVien.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim();
                objDMNHANVIEN.GhiChu = this.TxtGhichu.Text;
                if (this.CKActive.CheckState == CheckState.Checked)
                {
                    objDMNHANVIEN.Active = 1;
                }
                else
                {
                    objDMNHANVIEN.Active = 0;
                }
                if (objDMNHANVIEN.Save(this.cFrmTask))
                {
                    objDMNHANVIEN = null;
                    this.EnableControl = false;
                    this.VerifyGrid(this.cFrmTask);
                }
            }
        }

        private void CmdUnsave_Click(object sender, EventArgs e)
        {
            if (this.cFrmTask == "U")
            {
                this.ShowData(this.cFrmKhoa);
            }
            else if (this.cFrmKhoaOld != "")
            {
                this.cFrmKhoa = this.cFrmKhoaOld;
                this.ShowData(this.cFrmKhoa);
            }
            else
            {
                this.EmptyData();
            }
            this.EnableControl = false;
        }

        [DebuggerNonUserCode]
        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        public void EmptyData()
        {
            this.cFrmKhoa = modGeneral.CreatKey("DM_DoiTuong", 10, "DT");
            this.cFrmTask = "I";
            this.TxtMa.Text = "";
            this.TxtTenViet.Text = "";
            this.TxtTenAnh.Text = "";
            this.TxtDiaChi.Text = "";
            this.TxtDienThoai.Text = "";
            this.TxtEmail.Text = "";
            this.TxtWebsite.Text = "";
            this.TxtFax.Text = "";
            this.TxtGhichu.Text = "";
            this.TxtMa.Focus();
            this.CboLoaiNhanVien.SelectedValue = "";
            this.EnableControl = true;
        }

        private void Frm_DMNhanVien_KeyDown(object sender, KeyEventArgs e)
        {
        }

        private void Frm_DMNhanVien_Load(object sender, EventArgs e)
        {
            LVYModule.GetUserRight(ref this.mAllowView, ref this.mAllowDel, ref this.mAllowEdit, ref this.mAllowAdd, Conversions.ToString(this.Tag), modGeneral.H_USERNAME);
            if (!this.mAllowView)
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn kh\x00f4ng c\x00f3 quyền xem, li\x00ean hệ với người quản trị để biết th\x00eam chi tiết.", ""));
                this.Dispose();
            }
            else
            {
                this.EnableControl = false;
                this.SetLanguage();
                DataTable table = modGeneral.H_DUNGCHUNG.ShowList("0000000009");
                DataRow row = table.NewRow();
                row[0] = "";
                row[1] = "";
                table.Rows.InsertAt(row, 0);
                this.CboLoaiNhanVien.DataSource = table;
                this.CboLoaiNhanVien.DisplayMember = "Ten";
                this.CboLoaiNhanVien.ValueMember = "Ma";
                this.LoadData();
                this.bLoaded = true;
            }
        }

        [DebuggerStepThrough]
        private void InitializeComponent()
        {
            ComponentResourceManager manager = new ComponentResourceManager(typeof(Frm_DMNhanVien));
            this.ToolStrip1 = new ToolStrip();
            this.CmdAdd = new ToolStripButton();
            this.CmdEdit = new ToolStripButton();
            this.ToolStripSeparator2 = new ToolStripSeparator();
            this.CmdSave = new ToolStripButton();
            this.CmdUnsave = new ToolStripButton();
            this.ToolStripSeparator1 = new ToolStripSeparator();
            this.CmdFind = new ToolStripButton();
            this.CmdPrint = new ToolStripButton();
            this.ToolStripButton1 = new ToolStripSeparator();
            this.CmdDel = new ToolStripButton();
            this.ToolStripSeparator3 = new ToolStripSeparator();
            this.CmdExit = new ToolStripButton();
            this.CmdHelp = new ToolStripButton();
            this.VSList = new C1.Win.C1FlexGrid.C1FlexGrid();
            this.Panel1 = new Panel();
            this.Label5 = new Label();
            this.Label14 = new Label();
            this.TxtSearchName = new TextBox();
            this.TxtSearchCode = new TextBox();
            this.Label1 = new Label();
            this.CboLoaiNhanVien = new ComboBox();
            this.Label11 = new Label();
            this.TxtWebsite = new TextBox();
            this.Label3 = new Label();
            this.Label6 = new Label();
            this.TxtEmail = new TextBox();
            this.Label12 = new Label();
            this.TxtFax = new TextBox();
            this.TxtDienThoai = new TextBox();
            this.Label10 = new Label();
            this.TxtDiaChi = new TextBox();
            this.Label9 = new Label();
            this.CKActive = new CheckBox();
            this.TxtGhichu = new TextBox();
            this.Label18 = new Label();
            this.TxtTenAnh = new TextBox();
            this.Label7 = new Label();
            this.TxtTenViet = new TextBox();
            this.Label2 = new Label();
            this.TxtMa = new TextBox();
            this.C1DockingTab1 = new C1DockingTab();
            this.C1DockingTabPage1 = new C1DockingTabPage();
            this.C1DockingTab2 = new C1DockingTab();
            this.C1DockingTabPage2 = new C1DockingTabPage();
            this.ToolStrip1.SuspendLayout();
            this.VSList.BeginInit();
            this.Panel1.SuspendLayout();
            ((ISupportInitialize) this.C1DockingTab1).BeginInit();
            this.C1DockingTab1.SuspendLayout();
            this.C1DockingTabPage1.SuspendLayout();
            ((ISupportInitialize) this.C1DockingTab2).BeginInit();
            this.C1DockingTab2.SuspendLayout();
            this.C1DockingTabPage2.SuspendLayout();
            this.SuspendLayout();
            this.ToolStrip1.BackgroundImage = ACCOUNTING.My.Resources.Resources.bgbluenoborder;
            this.ToolStrip1.Items.AddRange(new ToolStripItem[] { this.CmdAdd, this.CmdEdit, this.ToolStripSeparator2, this.CmdSave, this.CmdUnsave, this.ToolStripSeparator1, this.CmdFind, this.CmdPrint, this.ToolStripButton1, this.CmdDel, this.ToolStripSeparator3, this.CmdExit, this.CmdHelp });
            Point point = new Point(0, 0);
            this.ToolStrip1.Location = point;
            this.ToolStrip1.Name = "ToolStrip1";
            Size size = new Size(0x2b7, 0x19);
            this.ToolStrip1.Size = size;
            this.ToolStrip1.TabIndex = 0x1f;
            this.ToolStrip1.Text = "ToolStrip1";
            this.CmdAdd.Image = (Image) manager.GetObject("CmdAdd.Image");
            this.CmdAdd.ImageTransparentColor = Color.White;
            this.CmdAdd.Name = "CmdAdd";
            size = new Size(0x48, 0x16);
            this.CmdAdd.Size = size;
            this.CmdAdd.Text = "&Th\x00eam mới";
            this.CmdEdit.Image = (Image) manager.GetObject("CmdEdit.Image");
            this.CmdEdit.ImageTransparentColor = Color.White;
            this.CmdEdit.Name = "CmdEdit";
            size = new Size(0x2e, 0x16);
            this.CmdEdit.Size = size;
            this.CmdEdit.Text = "&Sửa";
            this.ToolStripSeparator2.Name = "ToolStripSeparator2";
            size = new Size(6, 0x19);
            this.ToolStripSeparator2.Size = size;
            this.CmdSave.Image = (Image) manager.GetObject("CmdSave.Image");
            this.CmdSave.ImageTransparentColor = Color.WhiteSmoke;
            this.CmdSave.Name = "CmdSave";
            size = new Size(0x2d, 0x16);
            this.CmdSave.Size = size;
            this.CmdSave.Text = "&Lưu";
            this.CmdUnsave.Image = (Image) manager.GetObject("CmdUnsave.Image");
            this.CmdUnsave.ImageTransparentColor = Color.White;
            this.CmdUnsave.Name = "CmdUnsave";
            size = new Size(0x37, 0x16);
            this.CmdUnsave.Size = size;
            this.CmdUnsave.Text = "&K.Lưu";
            this.ToolStripSeparator1.Name = "ToolStripSeparator1";
            size = new Size(6, 0x19);
            this.ToolStripSeparator1.Size = size;
            this.CmdFind.Image = (Image) manager.GetObject("CmdFind.Image");
            this.CmdFind.ImageTransparentColor = Color.White;
            this.CmdFind.Name = "CmdFind";
            size = new Size(0x43, 0x16);
            this.CmdFind.Size = size;
            this.CmdFind.Text = "T\x00ecm kiếm";
            this.CmdFind.Visible = false;
            this.CmdPrint.Image = (Image) manager.GetObject("CmdPrint.Image");
            this.CmdPrint.ImageTransparentColor = Color.White;
            this.CmdPrint.Name = "CmdPrint";
            size = new Size(0x25, 0x16);
            this.CmdPrint.Size = size;
            this.CmdPrint.Text = "&In";
            this.ToolStripButton1.Name = "ToolStripButton1";
            size = new Size(6, 0x19);
            this.ToolStripButton1.Size = size;
            this.CmdDel.Image = (Image) manager.GetObject("CmdDel.Image");
            this.CmdDel.ImageTransparentColor = Color.White;
            this.CmdDel.Name = "CmdDel";
            size = new Size(0x2d, 0x16);
            this.CmdDel.Size = size;
            this.CmdDel.Text = "&X\x00f3a";
            this.ToolStripSeparator3.Name = "ToolStripSeparator3";
            size = new Size(6, 0x19);
            this.ToolStripSeparator3.Size = size;
            this.CmdExit.Alignment = ToolStripItemAlignment.Right;
            this.CmdExit.Image = (Image) manager.GetObject("CmdExit.Image");
            this.CmdExit.ImageTransparentColor = Color.White;
            this.CmdExit.Name = "CmdExit";
            size = new Size(0x37, 0x16);
            this.CmdExit.Size = size;
            this.CmdExit.Text = "Th&o\x00e1t";
            this.CmdHelp.Image = (Image) manager.GetObject("CmdHelp.Image");
            this.CmdHelp.ImageTransparentColor = Color.White;
            this.CmdHelp.Name = "CmdHelp";
            size = new Size(0x42, 0x16);
            this.CmdHelp.Size = size;
            this.CmdHelp.Text = "Trợ gi\x00fap";
            this.VSList.AllowEditing = false;
            this.VSList.AutoResize = false;
            this.VSList.BorderStyle = C1.Win.C1FlexGrid.Util.BaseControls.BorderStyleEnum.Light3D;
            this.VSList.ColumnInfo = "3,0,0,0,0,85,Columns:0{Caption:\"Kh\x00f3a\";Visible:False;}\t1{Width:80;Caption:\"M\x00e3\";}\t2{Width:135;Caption:\"T\x00ean (Việt)\";}\t";
            this.VSList.Dock = DockStyle.Fill;
            this.VSList.ExtendLastCol = true;
            this.VSList.FocusRect = FocusRectEnum.None;
            point = new Point(0, 0);
            this.VSList.Location = point;
            this.VSList.Name = "VSList";
            this.VSList.Rows.Count = 1;
            this.VSList.Rows.DefaultSize = 0x11;
            this.VSList.SelectionMode = SelectionModeEnum.Row;
            size = new Size(0x124, 0x176);
            this.VSList.Size = size;
            this.VSList.StyleInfo = manager.GetString("VSList.StyleInfo");
            this.VSList.TabIndex = 5;
            this.VSList.VisualStyle = C1.Win.C1FlexGrid.VisualStyle.Office2007Blue;
            this.Panel1.BackgroundImage = ACCOUNTING.My.Resources.Resources.background;
            this.Panel1.Controls.Add(this.Label5);
            this.Panel1.Controls.Add(this.Label14);
            this.Panel1.Controls.Add(this.TxtSearchName);
            this.Panel1.Controls.Add(this.TxtSearchCode);
            this.Panel1.Dock = DockStyle.Bottom;
            point = new Point(0, 0x176);
            this.Panel1.Location = point;
            this.Panel1.Name = "Panel1";
            size = new Size(0x124, 0x2b);
            this.Panel1.Size = size;
            this.Panel1.TabIndex = 6;
            this.Label5.AutoSize = true;
            this.Label5.BackColor = Color.Transparent;
            point = new Point(0x58, 0x1a);
            this.Label5.Location = point;
            this.Label5.Name = "Label5";
            size = new Size(0x2a, 13);
            this.Label5.Size = size;
            this.Label5.TabIndex = 0x13;
            this.Label5.Text = "T\x00ecm t\x00ean";
            this.Label14.AutoSize = true;
            this.Label14.BackColor = Color.Transparent;
            point = new Point(-1, 0x1a);
            this.Label14.Location = point;
            this.Label14.Name = "Label14";
            size = new Size(0x29, 13);
            this.Label14.Size = size;
            this.Label14.TabIndex = 0x12;
            this.Label14.Text = "T\x00ecm m\x00e3";
            point = new Point(0x5c, 3);
            this.TxtSearchName.Location = point;
            this.TxtSearchName.Name = "TxtSearchName";
            size = new Size(0xca, 20);
            this.TxtSearchName.Size = size;
            this.TxtSearchName.TabIndex = 1;
            point = new Point(1, 3);
            this.TxtSearchCode.Location = point;
            this.TxtSearchCode.Name = "TxtSearchCode";
            size = new Size(90, 20);
            this.TxtSearchCode.Size = size;
            this.TxtSearchCode.TabIndex = 0;
            this.Label1.AutoSize = true;
            this.Label1.BackColor = Color.Transparent;
            point = new Point(0x16, 0x1b6);
            this.Label1.Location = point;
            this.Label1.Name = "Label1";
            size = new Size(0x38, 13);
            this.Label1.Size = size;
            this.Label1.TabIndex = 0x8f;
            this.Label1.Text = "Nghiệp vụ";
            this.Label1.Visible = false;
            this.CboLoaiNhanVien.FormattingEnabled = true;
            point = new Point(0x6d, 0x1b3);
            this.CboLoaiNhanVien.Location = point;
            this.CboLoaiNhanVien.Name = "CboLoaiNhanVien";
            size = new Size(0x80, 0x15);
            this.CboLoaiNhanVien.Size = size;
            this.CboLoaiNhanVien.TabIndex = 0x8e;
            this.CboLoaiNhanVien.Visible = false;
            this.Label11.AutoSize = true;
            this.Label11.BackColor = Color.Transparent;
            point = new Point(13, 0x11);
            this.Label11.Location = point;
            this.Label11.Name = "Label11";
            size = new Size(0x48, 13);
            this.Label11.Size = size;
            this.Label11.TabIndex = 0x8d;
            this.Label11.Text = "M\x00e3 nh\x00e2n vi\x00ean";
            point = new Point(0x62, 180);
            this.TxtWebsite.Location = point;
            this.TxtWebsite.Name = "TxtWebsite";
            size = new Size(0x11b, 20);
            this.TxtWebsite.Size = size;
            this.TxtWebsite.TabIndex = 7;
            this.Label3.AutoSize = true;
            this.Label3.BackColor = Color.Transparent;
            point = new Point(11, 0xb9);
            this.Label3.Location = point;
            this.Label3.Name = "Label3";
            size = new Size(0x2e, 13);
            this.Label3.Size = size;
            this.Label3.TabIndex = 14;
            this.Label3.Text = "Website";
            this.Label6.AutoSize = true;
            this.Label6.BackColor = Color.Transparent;
            point = new Point(0xd5, 0x86);
            this.Label6.Location = point;
            this.Label6.Name = "Label6";
            size = new Size(0x18, 13);
            this.Label6.Size = size;
            this.Label6.TabIndex = 10;
            this.Label6.Text = "Fax";
            point = new Point(0x62, 0x9c);
            this.TxtEmail.Location = point;
            this.TxtEmail.Name = "TxtEmail";
            size = new Size(0x11b, 20);
            this.TxtEmail.Size = size;
            this.TxtEmail.TabIndex = 6;
            this.Label12.AutoSize = true;
            this.Label12.BackColor = Color.Transparent;
            point = new Point(11, 0xa1);
            this.Label12.Location = point;
            this.Label12.Name = "Label12";
            size = new Size(0x20, 13);
            this.Label12.Size = size;
            this.Label12.TabIndex = 12;
            this.Label12.Text = "Email";
            point = new Point(0x115, 0x83);
            this.TxtFax.Location = point;
            this.TxtFax.Name = "TxtFax";
            size = new Size(0x68, 20);
            this.TxtFax.Size = size;
            this.TxtFax.TabIndex = 5;
            point = new Point(0x62, 0x83);
            this.TxtDienThoai.Location = point;
            this.TxtDienThoai.Name = "TxtDienThoai";
            size = new Size(0x67, 20);
            this.TxtDienThoai.Size = size;
            this.TxtDienThoai.TabIndex = 4;
            this.Label10.AutoSize = true;
            this.Label10.BackColor = Color.Transparent;
            point = new Point(12, 0x86);
            this.Label10.Location = point;
            this.Label10.Name = "Label10";
            size = new Size(0x37, 13);
            this.Label10.Size = size;
            this.Label10.TabIndex = 8;
            this.Label10.Text = "Điện thoại";
            point = new Point(0x62, 0x57);
            this.TxtDiaChi.Location = point;
            this.TxtDiaChi.Multiline = true;
            this.TxtDiaChi.Name = "TxtDiaChi";
            size = new Size(0x11b, 40);
            this.TxtDiaChi.Size = size;
            this.TxtDiaChi.TabIndex = 3;
            this.Label9.AutoSize = true;
            this.Label9.BackColor = Color.Transparent;
            point = new Point(12, 0x59);
            this.Label9.Location = point;
            this.Label9.Name = "Label9";
            size = new Size(40, 13);
            this.Label9.Size = size;
            this.Label9.TabIndex = 6;
            this.Label9.Text = "Địa chỉ";
            this.CKActive.AutoSize = true;
            this.CKActive.BackColor = Color.Transparent;
            this.CKActive.Checked = true;
            this.CKActive.CheckState = CheckState.Checked;
            point = new Point(0x62, 230);
            this.CKActive.Location = point;
            this.CKActive.Name = "CKActive";
            size = new Size(0x38, 0x11);
            this.CKActive.Size = size;
            this.CKActive.TabIndex = 9;
            this.CKActive.Text = "Active";
            this.CKActive.UseVisualStyleBackColor = false;
            point = new Point(0x62, 0xcc);
            this.TxtGhichu.Location = point;
            this.TxtGhichu.Name = "TxtGhichu";
            size = new Size(0x11b, 20);
            this.TxtGhichu.Size = size;
            this.TxtGhichu.TabIndex = 8;
            this.Label18.AutoSize = true;
            this.Label18.BackColor = Color.Transparent;
            point = new Point(11, 0xcf);
            this.Label18.Location = point;
            this.Label18.Name = "Label18";
            size = new Size(0x3b, 13);
            this.Label18.Size = size;
            this.Label18.TabIndex = 0x10;
            this.Label18.Text = "Chức danh";
            point = new Point(0x62, 0x3f);
            this.TxtTenAnh.Location = point;
            this.TxtTenAnh.Name = "TxtTenAnh";
            size = new Size(0x11b, 20);
            this.TxtTenAnh.Size = size;
            this.TxtTenAnh.TabIndex = 2;
            this.Label7.AutoSize = true;
            this.Label7.BackColor = Color.Transparent;
            point = new Point(12, 0x42);
            this.Label7.Location = point;
            this.Label7.Name = "Label7";
            size = new Size(0x54, 13);
            this.Label7.Size = size;
            this.Label7.TabIndex = 4;
            this.Label7.Text = "T\x00ean (Tiếng Anh)";
            point = new Point(0x62, 0x27);
            this.TxtTenViet.Location = point;
            this.TxtTenViet.Name = "TxtTenViet";
            size = new Size(0x11b, 20);
            this.TxtTenViet.Size = size;
            this.TxtTenViet.TabIndex = 1;
            this.Label2.AutoSize = true;
            this.Label2.BackColor = Color.Transparent;
            point = new Point(12, 0x29);
            this.Label2.Location = point;
            this.Label2.Name = "Label2";
            size = new Size(0x53, 13);
            this.Label2.Size = size;
            this.Label2.TabIndex = 2;
            this.Label2.Text = "T\x00ean (Tiếng Việt)";
            point = new Point(0x62, 14);
            this.TxtMa.Location = point;
            this.TxtMa.Name = "TxtMa";
            size = new Size(0x67, 20);
            this.TxtMa.Size = size;
            this.TxtMa.TabIndex = 0;
            this.C1DockingTab1.Controls.Add(this.C1DockingTabPage1);
            this.C1DockingTab1.Dock = DockStyle.Left;
            point = new Point(0, 0x19);
            this.C1DockingTab1.Location = point;
            this.C1DockingTab1.Name = "C1DockingTab1";
            size = new Size(0x126, 0x1bb);
            this.C1DockingTab1.Size = size;
            this.C1DockingTab1.TabIndex = 0x90;
            this.C1DockingTab1.TabsSpacing = 5;
            this.C1DockingTab1.TabStyle = TabStyleEnum.Office2007;
            this.C1DockingTab1.VisualStyle = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.C1DockingTab1.VisualStyleBase = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.C1DockingTabPage1.Controls.Add(this.VSList);
            this.C1DockingTabPage1.Controls.Add(this.Panel1);
            this.C1DockingTabPage1.Image = ACCOUNTING.My.Resources.Resources.Selected;
            point = new Point(1, 0x19);
            this.C1DockingTabPage1.Location = point;
            this.C1DockingTabPage1.Name = "C1DockingTabPage1";
            size = new Size(0x124, 0x1a1);
            this.C1DockingTabPage1.Size = size;
            this.C1DockingTabPage1.TabIndex = 0;
            this.C1DockingTabPage1.Text = "Danh s\x00e1ch Nh\x00e2n vi\x00ean";
            this.C1DockingTab2.Controls.Add(this.C1DockingTabPage2);
            this.C1DockingTab2.Dock = DockStyle.Fill;
            point = new Point(0x126, 0x19);
            this.C1DockingTab2.Location = point;
            this.C1DockingTab2.Name = "C1DockingTab2";
            size = new Size(0x191, 0x1bb);
            this.C1DockingTab2.Size = size;
            this.C1DockingTab2.TabIndex = 0;
            this.C1DockingTab2.TabsSpacing = 5;
            this.C1DockingTab2.TabStyle = TabStyleEnum.Office2007;
            this.C1DockingTab2.VisualStyle = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.C1DockingTab2.VisualStyleBase = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.C1DockingTabPage2.Controls.Add(this.Label1);
            this.C1DockingTabPage2.Controls.Add(this.TxtMa);
            this.C1DockingTabPage2.Controls.Add(this.CboLoaiNhanVien);
            this.C1DockingTabPage2.Controls.Add(this.Label2);
            this.C1DockingTabPage2.Controls.Add(this.Label11);
            this.C1DockingTabPage2.Controls.Add(this.TxtTenViet);
            this.C1DockingTabPage2.Controls.Add(this.TxtWebsite);
            this.C1DockingTabPage2.Controls.Add(this.Label7);
            this.C1DockingTabPage2.Controls.Add(this.Label3);
            this.C1DockingTabPage2.Controls.Add(this.TxtTenAnh);
            this.C1DockingTabPage2.Controls.Add(this.Label6);
            this.C1DockingTabPage2.Controls.Add(this.Label18);
            this.C1DockingTabPage2.Controls.Add(this.TxtEmail);
            this.C1DockingTabPage2.Controls.Add(this.TxtGhichu);
            this.C1DockingTabPage2.Controls.Add(this.Label12);
            this.C1DockingTabPage2.Controls.Add(this.CKActive);
            this.C1DockingTabPage2.Controls.Add(this.TxtFax);
            this.C1DockingTabPage2.Controls.Add(this.Label9);
            this.C1DockingTabPage2.Controls.Add(this.TxtDienThoai);
            this.C1DockingTabPage2.Controls.Add(this.TxtDiaChi);
            this.C1DockingTabPage2.Controls.Add(this.Label10);
            point = new Point(1, 0x18);
            this.C1DockingTabPage2.Location = point;
            this.C1DockingTabPage2.Name = "C1DockingTabPage2";
            size = new Size(0x18f, 0x1a2);
            this.C1DockingTabPage2.Size = size;
            this.C1DockingTabPage2.TabIndex = 0;
            this.C1DockingTabPage2.Text = "Th\x00f4ng tin chi tiết Nh\x00e2n vi\x00ean";
            SizeF ef = new SizeF(6f, 13f);
            this.AutoScaleDimensions = ef;
            this.AutoScaleMode = AutoScaleMode.Font;
            size = new Size(0x2b7, 0x1d4);
            this.ClientSize = size;
            this.ControlBox = false;
            this.Controls.Add(this.C1DockingTab2);
            this.Controls.Add(this.C1DockingTab1);
            this.Controls.Add(this.ToolStrip1);
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.KeyPreview = true;
            this.Name = "Frm_DMNhanVien";
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Tag = "DM-0007             ";
            this.Text = "DANH MUC NHAN VIEN";
            this.ToolStrip1.ResumeLayout(false);
            this.ToolStrip1.PerformLayout();
            this.VSList.EndInit();
            this.Panel1.ResumeLayout(false);
            this.Panel1.PerformLayout();
            ((ISupportInitialize) this.C1DockingTab1).EndInit();
            this.C1DockingTab1.ResumeLayout(false);
            this.C1DockingTabPage1.ResumeLayout(false);
            ((ISupportInitialize) this.C1DockingTab2).EndInit();
            this.C1DockingTab2.ResumeLayout(false);
            this.C1DockingTabPage2.ResumeLayout(false);
            this.C1DockingTabPage2.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();
        }

        public void LoadData()
        {
            this.cFrmData = new DataView(this.objDMNHANVIEN.ShowAllList("E"));
            this.VSList.DataSource = this.cFrmData;
            C1.Win.C1FlexGrid.C1FlexGrid vSList = this.VSList;
            vSList.Cols[0].Visible = false;
            vSList.Cols[1].Width = 80;
            vSList[0, 1] = modGeneral.Tranlated("M\x00e3", "");
            vSList[0, 2] = modGeneral.Tranlated("T\x00ean", "");
            vSList = null;
            if (this.VSList.Rows.Count > 1)
            {
                this.cFrmKhoa = Conversions.ToString(this.VSList[1, 0]);
                this.ShowData(this.cFrmKhoa);
            }
        }

        public void SearchNhanVien(string field, string str)
        {
            string str2 = field + " LIKE '%" + str + "%'";
            this.cFrmData.RowFilter = str2;
            if (this.VSList.Rows.Count != 1)
            {
                this.VSList.Select(1, 0, 1, this.VSList.Cols.Count - 1);
            }
        }

        public void SetLanguage()
        {
            this.CmdAdd.Text = modGeneral.Tranlated(this.CmdAdd.Text, "");
            this.CmdEdit.Text = modGeneral.Tranlated(this.CmdEdit.Text, "");
            this.CmdDel.Text = modGeneral.Tranlated(this.CmdDel.Text, "");
            this.CmdSave.Text = modGeneral.Tranlated(this.CmdSave.Text, "");
            this.CmdUnsave.Text = modGeneral.Tranlated(this.CmdUnsave.Text, "");
            this.CmdPrint.Text = modGeneral.Tranlated(this.CmdPrint.Text, "");
            this.CmdHelp.Text = modGeneral.Tranlated(this.CmdHelp.Text, "");
            this.CmdExit.Text = modGeneral.Tranlated(this.CmdExit.Text, "");
            this.CmdHelp.Text = modGeneral.Tranlated(this.CmdHelp.Text, "");
            this.Label11.Text = modGeneral.Tranlated(this.Label11.Text, "");
            this.Label2.Text = modGeneral.Tranlated(this.Label2.Text, "");
            this.Label3.Text = modGeneral.Tranlated(this.Label3.Text, "");
            this.Label9.Text = modGeneral.Tranlated(this.Label9.Text, "");
            this.Label10.Text = modGeneral.Tranlated(this.Label10.Text, "");
            this.Label12.Text = modGeneral.Tranlated(this.Label12.Text, "");
            this.Label14.Text = modGeneral.Tranlated(this.Label14.Text, "");
            this.Label14.Text = modGeneral.Tranlated(this.Label14.Text, "");
            this.Label7.Text = modGeneral.Tranlated(this.Label7.Text, "");
            this.Label18.Text = modGeneral.Tranlated(this.Label18.Text, "");
            this.CKActive.Text = modGeneral.Tranlated(this.CKActive.Text, "");
            this.C1DockingTabPage1.Text = modGeneral.Tranlated(this.C1DockingTabPage1.Text, "");
            this.C1DockingTabPage2.Text = modGeneral.Tranlated(this.C1DockingTabPage2.Text, "");
        }

        public void ShowData(string pKhoa)
        {
            clsDMDoiTuong objDMNHANVIEN = this.objDMNHANVIEN;
            objDMNHANVIEN.Load(pKhoa);
            this.cFrmKhoa = objDMNHANVIEN.Khoa;
            this.TxtMa.Text = objDMNHANVIEN.Ma.Trim();
            this.TxtTenViet.Text = objDMNHANVIEN.TenViet.Trim();
            this.TxtTenAnh.Text = objDMNHANVIEN.TenAnh.Trim();
            this.TxtGhichu.Text = objDMNHANVIEN.GhiChu.Trim();
            this.TxtDienThoai.Text = objDMNHANVIEN.DienThoai.Trim();
            this.TxtDiaChi.Text = objDMNHANVIEN.DiaChi.Trim();
            this.TxtEmail.Text = objDMNHANVIEN.Email.Trim();
            this.TxtFax.Text = objDMNHANVIEN.Fax.Trim();
            this.TxtWebsite.Text = objDMNHANVIEN.Website;
            if (objDMNHANVIEN.Active == 1)
            {
                this.CKActive.CheckState = CheckState.Checked;
            }
            else
            {
                this.CKActive.CheckState = CheckState.Unchecked;
            }
            string str = LVYModule.sRight(objDMNHANVIEN.Loai.Trim(), 2);
            this.CboLoaiNhanVien.SelectedValue = str;
            objDMNHANVIEN = null;
        }

        private void TxtDienThoai_KeyPress(object sender, KeyPressEventArgs e)
        {
            if ((Strings.Asc(e.KeyChar) >= 20) && (Strings.InStr("0123456789 ", e.KeyChar.ToString(), CompareMethod.Binary) == 0))
            {
                e.KeyChar = '\0';
            }
        }

        private void TxtFax_KeyPress(object sender, KeyPressEventArgs e)
        {
            if ((Strings.Asc(e.KeyChar) >= 20) && (Strings.InStr("0123456789 ", e.KeyChar.ToString(), CompareMethod.Binary) == 0))
            {
                e.KeyChar = '\0';
            }
        }

        private void TxtMa_KeyPress(object sender, KeyPressEventArgs e)
        {
            e.KeyChar = Conversions.ToChar(e.KeyChar.ToString().ToUpper());
        }

        private void TxtSearchCode_TextChanged(object sender, EventArgs e)
        {
            this.SearchNhanVien("Ma", this.TxtSearchCode.Text);
        }

        private void TxtSearchName_TextChanged(object sender, EventArgs e)
        {
            this.SearchNhanVien("Ten", this.TxtSearchName.Text);
        }

        public void VerifyGrid(string pTask)
        {
            if (pTask.Trim().ToUpper() == "U")
            {
                this.VSList[this.VSList.Row, 1] = this.TxtMa.Text.Trim();
                if (modGeneral.H_LANGUAGE.ToUpper().Trim() == "VIET")
                {
                    this.VSList[this.VSList.Row, 2] = this.TxtTenViet.Text.Trim();
                }
                else
                {
                    this.VSList[this.VSList.Row, 2] = this.TxtTenAnh.Text.Trim();
                }
            }
            else
            {
                this.VSList.AddItem("");
                this.VSList[this.VSList.Rows.Count - 1, 0] = this.cFrmKhoa;
                this.VSList[this.VSList.Rows.Count - 1, 1] = this.TxtMa.Text.Trim();
                if (modGeneral.H_LANGUAGE.ToUpper().Trim() == "VIET")
                {
                    this.VSList[this.VSList.Rows.Count - 1, 2] = this.TxtTenViet.Text.Trim();
                }
                else
                {
                    this.VSList[this.VSList.Rows.Count - 1, 2] = this.TxtTenAnh.Text.Trim();
                }
            }
        }

        private void VSList_RowColChange(object sender, EventArgs e)
        {
            if ((this.bLoaded && (this.VSList.Rows.Count != 1)) && (this.VSList.Row > 0))
            {
                this.ShowData(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSList[this.VSList.Row, 0]), "", modGeneral.TypeOfValue.Nothing).ToString());
            }
        }

        internal virtual C1DockingTab C1DockingTab1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTab1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTab1 = value;
            }
        }

        internal virtual C1DockingTab C1DockingTab2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTab2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTab2 = value;
            }
        }

        internal virtual C1DockingTabPage C1DockingTabPage1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTabPage1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTabPage1 = value;
            }
        }

        internal virtual C1DockingTabPage C1DockingTabPage2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTabPage2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTabPage2 = value;
            }
        }

        internal virtual ComboBox CboLoaiNhanVien
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboLoaiNhanVien;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CboLoaiNhanVien = value;
            }
        }

        internal virtual CheckBox CKActive
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CKActive;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CKActive = value;
            }
        }

        internal virtual ToolStripButton CmdAdd
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdAdd;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdAdd_Click);
                if (this._CmdAdd != null)
                {
                    this._CmdAdd.Click -= handler;
                }
                this._CmdAdd = value;
                if (this._CmdAdd != null)
                {
                    this._CmdAdd.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdDel
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdDel;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdDel_Click);
                if (this._CmdDel != null)
                {
                    this._CmdDel.Click -= handler;
                }
                this._CmdDel = value;
                if (this._CmdDel != null)
                {
                    this._CmdDel.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdEdit
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdEdit;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdEdit_Click);
                if (this._CmdEdit != null)
                {
                    this._CmdEdit.Click -= handler;
                }
                this._CmdEdit = value;
                if (this._CmdEdit != null)
                {
                    this._CmdEdit.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdExit
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdExit;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdExit_Click);
                if (this._CmdExit != null)
                {
                    this._CmdExit.Click -= handler;
                }
                this._CmdExit = value;
                if (this._CmdExit != null)
                {
                    this._CmdExit.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdFind
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdFind;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CmdFind = value;
            }
        }

        internal virtual ToolStripButton CmdHelp
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdHelp;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdHelp_Click);
                if (this._CmdHelp != null)
                {
                    this._CmdHelp.Click -= handler;
                }
                this._CmdHelp = value;
                if (this._CmdHelp != null)
                {
                    this._CmdHelp.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdPrint
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdPrint;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdPrint_Click);
                if (this._CmdPrint != null)
                {
                    this._CmdPrint.Click -= handler;
                }
                this._CmdPrint = value;
                if (this._CmdPrint != null)
                {
                    this._CmdPrint.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdSave
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdSave;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdSave_Click);
                if (this._CmdSave != null)
                {
                    this._CmdSave.Click -= handler;
                }
                this._CmdSave = value;
                if (this._CmdSave != null)
                {
                    this._CmdSave.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdUnsave
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdUnsave;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdUnsave_Click);
                if (this._CmdUnsave != null)
                {
                    this._CmdUnsave.Click -= handler;
                }
                this._CmdUnsave = value;
                if (this._CmdUnsave != null)
                {
                    this._CmdUnsave.Click += handler;
                }
            }
        }

        public bool EnableControl
        {
            get
            {
                return this.mEnableControl;
            }
            set
            {
                this.mEnableControl = value;
                this.TxtMa.ReadOnly = !value;
                this.CmdAdd.Enabled = !value & this.mAllowAdd;
                this.CmdEdit.Enabled = !value & this.mAllowEdit;
                this.CmdDel.Enabled = !value & this.mAllowDel;
                this.TxtTenViet.ReadOnly = !value;
                this.TxtTenAnh.ReadOnly = !value;
                this.TxtDiaChi.ReadOnly = !value;
                this.TxtDienThoai.ReadOnly = !value;
                this.TxtEmail.ReadOnly = !value;
                this.TxtFax.ReadOnly = !value;
                this.TxtGhichu.ReadOnly = !value;
                this.TxtWebsite.ReadOnly = !value;
                this.CKActive.Enabled = value;
                this.VSList.Enabled = !value;
                this.TxtSearchCode.Enabled = !value;
                this.TxtSearchName.Enabled = !value;
                this.CmdAdd.Enabled = !value & this.mAllowEdit;
                this.CmdEdit.Enabled = !value & this.mAllowEdit;
                this.CmdDel.Enabled = !value;
                this.CmdSave.Enabled = value;
                this.CmdUnsave.Enabled = value;
                this.CmdPrint.Enabled = !value;
                this.CmdExit.Enabled = !value;
                this.CboLoaiNhanVien.Enabled = value;
            }
        }

        internal virtual Label Label1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label1 = value;
            }
        }

        internal virtual Label Label10
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label10;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label10 = value;
            }
        }

        internal virtual Label Label11
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label11;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label11 = value;
            }
        }

        internal virtual Label Label12
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label12;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label12 = value;
            }
        }

        internal virtual Label Label14
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label14;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label14 = value;
            }
        }

        internal virtual Label Label18
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label18;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label18 = value;
            }
        }

        internal virtual Label Label2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label2 = value;
            }
        }

        internal virtual Label Label3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label3 = value;
            }
        }

        internal virtual Label Label5
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label5;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label5 = value;
            }
        }

        internal virtual Label Label6
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label6;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label6 = value;
            }
        }

        internal virtual Label Label7
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label7;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label7 = value;
            }
        }

        internal virtual Label Label9
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label9;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label9 = value;
            }
        }

        internal virtual Panel Panel1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Panel1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Panel1 = value;
            }
        }

        internal virtual ToolStrip ToolStrip1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStrip1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStrip1 = value;
            }
        }

        internal virtual ToolStripSeparator ToolStripButton1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripButton1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripButton1 = value;
            }
        }

        internal virtual ToolStripSeparator ToolStripSeparator1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripSeparator1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripSeparator1 = value;
            }
        }

        internal virtual ToolStripSeparator ToolStripSeparator2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripSeparator2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripSeparator2 = value;
            }
        }

        internal virtual ToolStripSeparator ToolStripSeparator3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripSeparator3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripSeparator3 = value;
            }
        }

        internal virtual TextBox TxtDiaChi
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtDiaChi;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtDiaChi = value;
            }
        }

        internal virtual TextBox TxtDienThoai
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtDienThoai;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                System.Windows.Forms.KeyPressEventHandler handler = new System.Windows.Forms.KeyPressEventHandler(this.TxtDienThoai_KeyPress);
                if (this._TxtDienThoai != null)
                {
                    this._TxtDienThoai.KeyPress -= handler;
                }
                this._TxtDienThoai = value;
                if (this._TxtDienThoai != null)
                {
                    this._TxtDienThoai.KeyPress += handler;
                }
            }
        }

        internal virtual TextBox TxtEmail
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtEmail;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtEmail = value;
            }
        }

        internal virtual TextBox TxtFax
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtFax;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                System.Windows.Forms.KeyPressEventHandler handler = new System.Windows.Forms.KeyPressEventHandler(this.TxtFax_KeyPress);
                if (this._TxtFax != null)
                {
                    this._TxtFax.KeyPress -= handler;
                }
                this._TxtFax = value;
                if (this._TxtFax != null)
                {
                    this._TxtFax.KeyPress += handler;
                }
            }
        }

        internal virtual TextBox TxtGhichu
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtGhichu;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtGhichu = value;
            }
        }

        internal virtual TextBox TxtMa
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtMa;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                System.Windows.Forms.KeyPressEventHandler handler = new System.Windows.Forms.KeyPressEventHandler(this.TxtMa_KeyPress);
                if (this._TxtMa != null)
                {
                    this._TxtMa.KeyPress -= handler;
                }
                this._TxtMa = value;
                if (this._TxtMa != null)
                {
                    this._TxtMa.KeyPress += handler;
                }
            }
        }

        internal virtual TextBox TxtSearchCode
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtSearchCode;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.TxtSearchCode_TextChanged);
                if (this._TxtSearchCode != null)
                {
                    this._TxtSearchCode.TextChanged -= handler;
                }
                this._TxtSearchCode = value;
                if (this._TxtSearchCode != null)
                {
                    this._TxtSearchCode.TextChanged += handler;
                }
            }
        }

        internal virtual TextBox TxtSearchName
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtSearchName;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.TxtSearchName_TextChanged);
                if (this._TxtSearchName != null)
                {
                    this._TxtSearchName.TextChanged -= handler;
                }
                this._TxtSearchName = value;
                if (this._TxtSearchName != null)
                {
                    this._TxtSearchName.TextChanged += handler;
                }
            }
        }

        internal virtual TextBox TxtTenAnh
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTenAnh;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTenAnh = value;
            }
        }

        internal virtual TextBox TxtTenViet
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTenViet;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTenViet = value;
            }
        }

        internal virtual TextBox TxtWebsite
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtWebsite;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtWebsite = value;
            }
        }

        internal virtual C1.Win.C1FlexGrid.C1FlexGrid VSList
        {
            [DebuggerNonUserCode]
            get
            {
                return this._VSList;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.VSList_RowColChange);
                if (this._VSList != null)
                {
                    this._VSList.RowColChange -= handler;
                }
                this._VSList = value;
                if (this._VSList != null)
                {
                    this._VSList.RowColChange += handler;
                }
            }
        }
    }
}

